package com.aggregate.pay.sanstar;

import java.util.Map;

import com.aggregate.pay.sanstar.bean.AttachLoadData;
import com.aggregate.pay.sanstar.bean.AttachLoadResult;
import com.aggregate.pay.sanstar.bean.CardActiveData;
import com.aggregate.pay.sanstar.bean.CardActiveResult;
import com.aggregate.pay.sanstar.bean.CardAuthResult;
import com.aggregate.pay.sanstar.bean.CardBalanceData;
import com.aggregate.pay.sanstar.bean.CardBalanceResult;
import com.aggregate.pay.sanstar.bean.CardCancelData;
import com.aggregate.pay.sanstar.bean.CardCancelResult;
import com.aggregate.pay.sanstar.bean.CardChargeConfirmResult;
import com.aggregate.pay.sanstar.bean.CardChargeData;
import com.aggregate.pay.sanstar.bean.CardChargeResult;
import com.aggregate.pay.sanstar.bean.CardConfirmData;
import com.aggregate.pay.sanstar.bean.CardCreateData;
import com.aggregate.pay.sanstar.bean.CardCreateResult;
import com.aggregate.pay.sanstar.bean.CardLoadData;
import com.aggregate.pay.sanstar.bean.CardLoadResult;
import com.aggregate.pay.sanstar.bean.CardLockData;
import com.aggregate.pay.sanstar.bean.CardLockResult;
import com.aggregate.pay.sanstar.bean.CardQueryData;
import com.aggregate.pay.sanstar.bean.CardQueryResult;
import com.aggregate.pay.sanstar.bean.FeatureBindData;
import com.aggregate.pay.sanstar.bean.FeatureBindResult;
import com.aggregate.pay.sanstar.bean.FeaturePickData;
import com.aggregate.pay.sanstar.bean.FeaturePickResult;
import com.aggregate.pay.sanstar.bean.GroupLoadData;
import com.aggregate.pay.sanstar.bean.GroupLoadResult;
import com.aggregate.pay.sanstar.bean.LogUploadAppLogData;
import com.aggregate.pay.sanstar.bean.LogUploadAppLogResult;
import com.aggregate.pay.sanstar.bean.LogUploadFacePictureData;
import com.aggregate.pay.sanstar.bean.LogUploadFacePictureResult;
import com.aggregate.pay.sanstar.bean.PayCreateData;
import com.aggregate.pay.sanstar.bean.PayCreateResult;
import com.aggregate.pay.sanstar.bean.PayNotifyData;
import com.aggregate.pay.sanstar.bean.PayOrder;
import com.aggregate.pay.sanstar.bean.PayQueryData;
import com.aggregate.pay.sanstar.bean.PayQueryResult;
import com.aggregate.pay.sanstar.bean.PayRepealData;
import com.aggregate.pay.sanstar.bean.PayUploadData;
import com.aggregate.pay.sanstar.bean.PayUploadResult;
import com.aggregate.pay.sanstar.bean.RefundCreateData;
import com.aggregate.pay.sanstar.bean.RefundCreateResult;
import com.aggregate.pay.sanstar.bean.RefundOrder;
import com.aggregate.pay.sanstar.bean.RefundQueryData;
import com.aggregate.pay.sanstar.bean.RefundQueryResult;
import com.aggregate.pay.sanstar.bean.StafferLoadData;
import com.aggregate.pay.sanstar.bean.StafferLoadResult;
import com.aggregate.pay.sanstar.bean.StatisticsOverivewData;
import com.aggregate.pay.sanstar.bean.StatisticsPayData;
import com.aggregate.pay.sanstar.bean.StatisticsRefundData;
import com.aggregate.pay.sanstar.bean.TerminalBindData;
import com.aggregate.pay.sanstar.bean.TerminalBindResult;
import com.aggregate.pay.sanstar.bean.TerminalLicenseActiveData;
import com.aggregate.pay.sanstar.bean.TerminalLicenseActiveResult;
import com.aggregate.pay.sanstar.bean.TerminalLicenseLoadData;
import com.aggregate.pay.sanstar.bean.TerminalLicenseLoadResult;
import com.aggregate.pay.sanstar.bean.TerminalLoadResult;
import com.aggregate.pay.sanstar.bean.TerminalPantData;
import com.aggregate.pay.sanstar.bean.TerminalPantResult;
import com.aggregate.pay.sanstar.bean.WxFaceInitResult;
import com.aggregate.pay.sanstar.bean.WxFaceLoadData;
import com.aggregate.pay.sanstar.bean.WxFaceLoadResult;
import com.aggregate.pay.sanstar.bean.WxReportInitResult;
import com.aggregate.pay.sanstar.support.Client;
import com.aggregate.pay.sanstar.support.Config;
import com.aggregate.pay.sanstar.support.Factory;
import com.aggregate.pay.sanstar.support.HttpClient;
import com.aggregate.pay.sanstar.support.Merch;
import com.aggregate.pay.sanstar.support.client.AttachLoad;
import com.aggregate.pay.sanstar.support.client.CardActive;
import com.aggregate.pay.sanstar.support.client.CardAuth;
import com.aggregate.pay.sanstar.support.client.CardBalance;
import com.aggregate.pay.sanstar.support.client.CardCancel;
import com.aggregate.pay.sanstar.support.client.CardCharge;
import com.aggregate.pay.sanstar.support.client.CardChargeConfirm;
import com.aggregate.pay.sanstar.support.client.CardCreate;
import com.aggregate.pay.sanstar.support.client.CardCreateQuery;
import com.aggregate.pay.sanstar.support.client.CardLoad;
import com.aggregate.pay.sanstar.support.client.CardLock;
import com.aggregate.pay.sanstar.support.client.FeatureBind;
import com.aggregate.pay.sanstar.support.client.FeaturePick;
import com.aggregate.pay.sanstar.support.client.GroupLoad;
import com.aggregate.pay.sanstar.support.client.LogUploadAppLog;
import com.aggregate.pay.sanstar.support.client.LogUploadFacePicture;
import com.aggregate.pay.sanstar.support.client.PayCreate;
import com.aggregate.pay.sanstar.support.client.PayNotify;
import com.aggregate.pay.sanstar.support.client.PayQuery;
import com.aggregate.pay.sanstar.support.client.PayRepeal;
import com.aggregate.pay.sanstar.support.client.PayUpload;
import com.aggregate.pay.sanstar.support.client.RefundCreate;
import com.aggregate.pay.sanstar.support.client.RefundQuery;
import com.aggregate.pay.sanstar.support.client.StafferLoad;
import com.aggregate.pay.sanstar.support.client.StatisticsOverview;
import com.aggregate.pay.sanstar.support.client.StatisticsPay;
import com.aggregate.pay.sanstar.support.client.StatisticsRefund;
import com.aggregate.pay.sanstar.support.client.TerminalBind;
import com.aggregate.pay.sanstar.support.client.TerminalLicenseActive;
import com.aggregate.pay.sanstar.support.client.TerminalLicenseLoad;
import com.aggregate.pay.sanstar.support.client.TerminalLoad;
import com.aggregate.pay.sanstar.support.client.TerminalPant;
import com.aggregate.pay.sanstar.support.client.TerminalSign;
import com.aggregate.pay.sanstar.support.client.TerminalUnbind;
import com.aggregate.pay.sanstar.support.client.WxFaceInit;
import com.aggregate.pay.sanstar.support.client.WxFaceLoad;
import com.aggregate.pay.sanstar.support.client.WxReportInit;

import jakarta.servlet.http.HttpServletRequest;

/**
 * 盛思达支付接口工具类，相关配置和接口调用从此类开始
 * @author Moyq5
 * @date 2017年9月29日
 */
public abstract class SanstarApiFactory {

	public static void config(Config config, HttpClient httpClient) {
		Factory.setConfig(config);
		Factory.setHttpClient(httpClient);
	}

	public static Client<TerminalBindData, TerminalBindResult> terminalBind(Merch merch) {
		return Factory.getClient(TerminalBind.class, merch);
	}
	
	public static Client<Void, TerminalBindResult> terminalSign(Merch merch) {
		return Factory.getClient(TerminalSign.class, merch);
	}
	
	public static Client<Void, Void> terminalUnbind(Merch merch) {
		return Factory.getClient(TerminalUnbind.class, merch);
	}

	public static Client<TerminalPantData, TerminalPantResult> terminalPant(Merch merch) {
		return Factory.getClient(TerminalPant.class, merch);
	}
	
	public static Client<Void, TerminalLoadResult> terminalLoad(Merch merch) {
        return Factory.getClient(TerminalLoad.class, merch);
    }
	
	public static Client<TerminalLicenseLoadData, TerminalLicenseLoadResult> terminalLicenseLoad(Merch merch) {
        return Factory.getClient(TerminalLicenseLoad.class, merch);
    }

	public static Client<TerminalLicenseActiveData, TerminalLicenseActiveResult> terminalLicenseActive(Merch merch) {
        return Factory.getClient(TerminalLicenseActive.class, merch);
    }

    public static Client<GroupLoadData, GroupLoadResult> groupLoad(Merch merch) {
        return Factory.getClient(GroupLoad.class, merch);
    }
    
    public static Client<StafferLoadData, StafferLoadResult> stafferLoad(Merch merch) {
        return Factory.getClient(StafferLoad.class, merch);
    }
    
	public static Client<PayCreateData, PayCreateResult> payCreate(Merch merch) {
		return Factory.getClient(PayCreate.class, merch);
	}

	public static Client<PayUploadData, PayUploadResult> payUpload(Merch merch) {
		return Factory.getClient(PayUpload.class, merch);
	}

	public static Client<PayQueryData, PayQueryResult> payQuery(Merch merch) {
		return Factory.getClient(PayQuery.class, merch);
	}
	
	public static Client<PayRepealData, Void> payRepeal(Merch merch) {
		return Factory.getClient(PayRepeal.class, merch);
	}
	
	public static Client<HttpServletRequest, PayNotifyData> payNotify(Merch merch) {
		return Factory.getClient(PayNotify.class, merch);
	}
	
	public static Client<RefundCreateData, RefundCreateResult> refundCreate(Merch merch) {
		return Factory.getClient(RefundCreate.class, merch);
	}
	
	public static Client<RefundQueryData, RefundQueryResult> refundQuery(Merch merch) {
		return Factory.getClient(RefundQuery.class, merch);
	}

	public static Client<StatisticsOverivewData, Map<String, Object>> statisticsOverview(Merch merch) {
		return Factory.getClient(StatisticsOverview.class, merch);
	}

	public static Client<StatisticsPayData, PageResult<PayOrder>> statisticsPay(Merch merch) {
		return Factory.getClient(StatisticsPay.class, merch);
	}

	public static Client<StatisticsRefundData, PageResult<RefundOrder>> statisticsRefund(Merch merch) {
		return Factory.getClient(StatisticsRefund.class, merch);
	}

	public static Client<Void, WxReportInitResult> wxReportInit(Merch merch) {
		return Factory.getClient(WxReportInit.class, merch);
	}
	
	public static Client<String, WxFaceInitResult> wxFaceInit(Merch merch) {
		return Factory.getClient(WxFaceInit.class, merch);
	}

	public static Client<WxFaceLoadData, WxFaceLoadResult> wxFaceLoad(Merch merch) {
		return Factory.getClient(WxFaceLoad.class, merch);
	}
	
	public static Client<Void, CardAuthResult> cardAuth(Merch merch) {
		return Factory.getClient(CardAuth.class, merch);
	}
	
	public static Client<CardCreateData, CardCreateResult> cardCreate(Merch merch) {
		return Factory.getClient(CardCreate.class, merch);
	}
	
	public static Client<CardQueryData, CardQueryResult> cardCreateQuery(Merch merch) {
		return Factory.getClient(CardCreateQuery.class, merch);
	}
	
	public static Client<CardActiveData, CardActiveResult> cardActive(Merch merch) {
		return Factory.getClient(CardActive.class, merch);
	}
	
	public static Client<CardBalanceData, CardBalanceResult> cardBalance(Merch merch) {
		return Factory.getClient(CardBalance.class, merch);
	}
	
	public static Client<CardLoadData, CardLoadResult> cardLoad(Merch merch) {
        return Factory.getClient(CardLoad.class, merch);
    }
    
	public static Client<CardLockData, CardLockResult> cardLock(Merch merch) {
		return Factory.getClient(CardLock.class, merch);
	}

	public static Client<CardChargeData, CardChargeResult> cardCharge(Merch merch) {
		return Factory.getClient(CardCharge.class, merch);
	}

	public static Client<CardConfirmData, CardChargeConfirmResult> cardChargeConfirm(Merch merch) {
		return Factory.getClient(CardChargeConfirm.class, merch);
	}
	
	public static Client<CardCancelData, CardCancelResult> cardCancel(Merch merch) {
		return Factory.getClient(CardCancel.class, merch);
	}
	
	public static Client<LogUploadFacePictureData, LogUploadFacePictureResult> logUploadFacePicture(Merch merch) {
        return Factory.getClient(LogUploadFacePicture.class, merch);
    }

	public static Client<LogUploadAppLogData, LogUploadAppLogResult> logUploadAppLog(Merch merch) {
        return Factory.getClient(LogUploadAppLog.class, merch);
    }

    public static Client<FeaturePickData, FeaturePickResult> featurePick(Merch merch) {
        return Factory.getClient(FeaturePick.class, merch);
    }

    public static Client<FeatureBindData, FeatureBindResult> featureBind(Merch merch) {
        return Factory.getClient(FeatureBind.class, merch);
    }

    public static <T> Client<AttachLoadData, AttachLoadResult<T>> attachLoad(Merch merch, Class<T> clazz) {
        return new AttachLoad<T>(merch, clazz);
    }

}
